package com.alisls.demo.springcloud.service.user.entity.resource;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * 菜单实体
 *
 * @author Ke Wang
 * @date 2020/11/5
 */
@Entity(name = "sys_menu")
@NoArgsConstructor
@Getter
@Setter
@ToString
public class MenuDO extends Resource {

    /**
     * 菜单类型
     * menuType: 1-目录；2-叶子
     */
    @Column(nullable = false, length = 1)
    private String menuType;

    /**
     * 菜单图标
     */
    @Column(length = 500)
    private String menuIcon;

    /**
     * 是否可见
     * visible: 0-不可见；1(或null)-可见
     */
    @Column(name = "is_visible")
    private Integer visible;

    /**
     * 是否虚拟节点
     * 虚拟节点将不会在主菜单中展示
     */
    @Column(name = "is_virtual")
    private Integer virtual;

    /**
     * 菜单路径
     */
    @Column(length = 1000)
    private String url;

    /**
     * 菜单状态
     * state: 0-为生效 1-已生效 2-已作废
     */
    private Integer status;

    /**
     * 排序值
     */
    @Column
    private float position;

    /**
     * 是否删除
     */
    @Column(name = "is_deleted")
    private Integer deleted;

}
